package com.web.datasource;

/**
 * Created with IntelliJ IDEA.
 * User: lxf
 * Date: 2016/4/26
 * Time: 11:53
 * To change this template use File | Settings | File Templates.
 */
public class DataSourceContextHolder {

    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();

    public static void master() {
        contextHolder.set("master");
    }

    public static String getType() {
        return contextHolder.get();
    }

    public static void remove() {
        contextHolder.remove();
    }


}
